QuickOPC User's Guide and Reference
Examples - OPC XML-DA - Write a single value
// This example shows how to write a value into a single OPC XML-DA item.

using System;
using OpcLabs.EasyOpc.DataAccess;
using OpcLabs.EasyOpc.OperationModel;

namespace DocExamples.DataAccess.Xml
{
    class WriteItemValue
    {
        public static void Main1Xml()
        {
            // Instantiate the client object.
            var client = new EasyDAClient();

            try
            {
                client.WriteItemValue(
                    "http://opcxml.demo-this.com/XmlDaSampleServer/Service.asmx", 
                    "Static/Analog Types/Int", 
                    12345);
            }
            catch (OpcException opcException)
            {
                Console.WriteLine("*** Failure: {0}", opcException.GetBaseException().Message);
            }
        }
    }
}
# This example shows how to write a value into a single OPC XML-DA item.

# The QuickOPC package is needed. Install it using "pip install opclabs_quickopc".
import opclabs_quickopc

# Import .NET namespaces.
from OpcLabs.EasyOpc import *
from OpcLabs.EasyOpc.DataAccess import *
from OpcLabs.EasyOpc.OperationModel import *


# Instantiate the client object.
client = EasyDAClient()

# Perform the operation
try:
    IEasyDAClientExtension.WriteItemValue(client,
        ServerDescriptor('http://opcxml.demo-this.com/XmlDaSampleServer/Service.asmx'),
        DAItemDescriptor('Static/Analog Types/Int'),
        12345)
except OpcException as opcException:
    print('*** Failure: ' + opcException.GetBaseException().Message)
    exit()

print('Finished.')
' This example shows how to write a value into a single OPC XML-DA item.

Imports OpcLabs.EasyOpc.DataAccess
Imports OpcLabs.EasyOpc.OperationModel

Namespace DataAccess.Xml
    Partial Friend Class WriteItemValue
        Public Shared Sub Main1Xml()
            Dim client = New EasyDAClient()

            Try
                client.WriteItemValue("http://opcxml.demo-this.com/XmlDaSampleServer/Service.asmx", "Static/Analog Types/Int", 12345)
            Catch opcException As OpcException
                Console.WriteLine("*** Failure: {0}", opcException.GetBaseException().Message)
                Exit Sub
            End Try
        End Sub
    End Class
End Namespace
QuickOPC supports OPC XML-DA also on Linux and macOS.
See Also

Examples - OPC Data Access

Conceptual